package com.meituan.sdk.model.ddzh.thirdresource.updateDeviceInfo;

import com.meituan.sdk.annotations.ApiMeta;
import java.util.List;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import javax.validation.constraints.NotNull;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;
import javax.validation.constraints.NotEmpty;

/**
* 更新单个门店下变更的设备信息接口
* This file was automatically generated.
*/
@ApiMeta(
    path = "/ddzh/thirdresource/updatedeviceinfo",
    businessId = 58,
    apiVersion = "10021",
    apiName = "update_device_info",
    needAuth = true
)
public class UpdateDeviceInfoRequest implements MeituanRequest<UpdateDeviceInfoResponse> {
    /**
    * <p data-diff-id="ct-diff-id-b6174523-a4ca-4288-914c-7ad22d200283">timestamp</p>
    */
    @NotNull(message = "timestamp不能为空")
    @SerializedName("timestamp")
    private Long timestamp;
    /**
    * <p data-diff-id="ct-diff-id-a80c19f9-11d5-4164-9293-ef02228eee83"><span style="color: rgba(0, 0, 0, 0.65)">设备信息发生变更的设备列表</span></p>
    */
    @NotEmpty(message = "deviceItems不能为空")
    @SerializedName("deviceItems")
    private List<UnifiedDeviceItem> deviceItems;

    public Long getTimestamp() {
        return timestamp;
    }
    public void setTimestamp(Long timestamp) {
        this.timestamp = timestamp;
    }
    public List<UnifiedDeviceItem> getDeviceItems() {
        return deviceItems;
    }
    public void setDeviceItems(List<UnifiedDeviceItem> deviceItems) {
        this.deviceItems = deviceItems;
    }


    @Override
    public MeituanResponse<UpdateDeviceInfoResponse> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<UpdateDeviceInfoResponse>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "UpdateDeviceInfoRequest{" + "timestamp=" + timestamp + "," + "deviceItems=" + deviceItems + "}";
    }
}
